#!/user/bin/env python
# -*- coding: utf-8 -*-
# @Software: PyCharm
# @Time : 2021/07/05 16:42
# @Author : ziqi.zhang
# @Version : 1.0.0
# @Description : 百度搜索的页面对象PO，获取页面元素

class BaiduSearchPO(object):
    """百度首页"""

    def __init__(self, driver):
        self.driver = driver

    def url(self):
        """输入url进入首页"""
        return self.driver.get("https://www.baidu.com")

    def search_input(self):
        """搜索框"""
        return self.driver.get_element('search_input')

    def search_button(self):
        """搜索按钮"""
        return self.driver.get_element('search_button', 'SearchElement')

    def result(self):
        """搜索结果页中的“百度为您找到相关结果约”文案"""
        return self.driver.get_element('result', 'SearchElement')
